<template>
    <el-form-item label="onClick" label-width="150px">
        <el-button type="info" icon="el-icon-edit" plain round @click="visible=true">
            {{i18nt('designer.setting.addEventHandler')}}
        </el-button>

        <select-model-data :selectedWidget="selectedWidget"
                           :visible.sync="visible"
                           keyType="onClick"
                           :designer="designer">
        </select-model-data>
    </el-form-item>
</template>

<script>
import i18n from "@/utils/i18n"
import eventMixin from "@/components/form-designer/setting-panel/property-editor/event-handler/eventMixin"
import SelectModelData from "@/components/form-designer/config-common/select-model-data/select-model-data.vue";

export default {
    name: "onClick-editor",
    components: {SelectModelData},
    mixins: [i18n, eventMixin],
    props: {
        designer: Object,
        selectedWidget: Object,
        optionModel: Object,
    },
    data() {
        return {
            eventParams: [],
            visible: false
        }
    }
}
</script>

<style scoped>

</style>
